package com.wizz.trade.trading.service.impl;

import com.wizz.trade.trading.entity.Invoice;
import com.wizz.trade.trading.mapper.InvoiceMapper;
import com.wizz.trade.trading.service.InvoiceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 发票表 服务实现类
 * </p>
 *
 * @author fyftless
 * @since 2023-04-23 04:37:04
 */
@Service
public class InvoiceServiceImpl extends ServiceImpl<InvoiceMapper, Invoice> implements InvoiceService {

    @Resource
    private InvoiceMapper invoiceMapper;

    @Override
    public void addInvoice(Invoice invoice) {
        invoiceMapper.insert(invoice);
    }

    @Override
    public void updateInvoice(Invoice invoice) {
        invoiceMapper.updateById(invoice);
    }

    @Override
    public void deleteInvoice(Integer id) {
        invoiceMapper.deleteById(id);
    }

//    @Override
//    public PageVo<Invoice> getPage(InvoicePageDto invoicePageDto) {
//        return null;
//    }

    @Override
    public List<Invoice> getAll() {
        return invoiceMapper.selectList(null);
    }

}
